<template>
    <div class="header">
        <i class="iconfont icon-fanhui" @click="back"></i>
        <span><slot>可开红包：10</slot></span>
    </div>
</template>

<script>
import store from "@/store"
export default {
    name: 'iheader',
    methods: {
        back() {
            store.commit('enter_red', 0)
            this.$router.go(-1)
        }
    }
}
</script>

<style scoped lang="less">
@import "@/theme.less";
.header{
    position: fixed;
    z-index: 10;
    top:0;
    left:0;
    width: 375px;
    height: 45px;
    line-height: 45px;
    background: @page-bg;
    box-shadow: 0 5px 5px rgba(0,0,0,.1);
    text-align: center;
    color: @font-color1;
    font-size: @font-middle;
    i{
        position: absolute;
        left:0;
        top:0;
        width: 40px;
        display: inline-block;
        font-size: 20px;
    }
}
</style>
